
// Script by Hyperdog.se. Revision v1.2 modified

var detect = navigator.userAgent.toLowerCase();
var place,total,thestring;
var style = "";

function client_check() {
	// Browser/Version/OS check
	if (checkIt('konqueror')) {
		this.b = "dom";
		this.app = "konqueror";
	} else if (checkIt('safari')) {
		this.b = "dom";
		this.app = "safari";
	} else if (checkIt('opera')) {
		this.b = "dom";	// Support for opera<7 scrapped
		this.app = "opera";
	} else if (checkIt('msie')) {
		this.b = "ie"
		this.app = "ie"
	} else if (!checkIt('compatible')) { // All mozilla derivatives = moz
		this.b = "dom"	// Support for ns<=4 scrapped
		this.app = "moz"
	} else {
		this.b = "dom";
		this.app = "?"
	}	
	if (checkIt('linux')) this.os = "linux";
	else if (checkIt('x11')) this.os = "unix";
	else if (checkIt('mac')) this.os = "mac"
	else if (checkIt('win')) this.os = "win"
	else this.os = "other";

	// Set stylesheet, opera gets own style
	if (this.app == "opera") {
		style = "css/opera.css";
	} else {
		style = "css/"+this.b+".css";
	}

	// Check for flash
	// Removed in favour for flash/asp based check
}
function checkIt(string) {
	place = detect.indexOf(string) + 1;
	return place;
}

// Run
check = new client_check();
print_css();

